<template>
    <div>
        <h2>子组件</h2>
    <p>{{ user }}</p>
    
   <p @hhh="qwer">
     {{ users.name }}
    {{ users.age }}
   </p>
    </div>
</template>
<script setup >
  import {defineProps,defineEmits, ref, reactive} from 'vue'
//   子组件
defineProps({
    user:{
        type:Object,
    }
})
const users=reactive({
    
    name:'我是儿子呀',
    age:18

})
const emit=defineEmits(['users'])
const qwer=(e)=>{
    emit('users',users)
    console.log(e);
    
    
}
</script>